/*
 * gradient.h
 *
 *  Created on: Oct 22, 2010
 *      Author: sanjeev
 */
#include <constants.h>

#ifndef GRADIENT_H_
#define GRADIENT_H_

class GradientPlanner {
	int h,w;
	double getGradientAngle(const MATRIX &navfn, int x, int y);
	bool visitedRecently(const double currx,const double curry,std::vector<PII> &path);
	void resetInNeighborhood(double &currx, double &curry, std::vector<PII> &path,const MATRIX &navfn);

	void clear();
	void make_matrix(int height, int width);
public:
	MATRIX gradient;
	std::vector<PII> planPath(const MATRIX &navfn, PII bot, PII goal, int grain);

	GradientPlanner();
	virtual ~GradientPlanner();
};

#endif /* GRADIENT_H_ */
